package org.aftputil;

import java.util.Date;

import javax.swing.ImageIcon;

public abstract class AftpFileItem
{ 
  public static final int DIRECTORY = 0x0000001;
  public static final int FILE = 0x0000002;
  
  
   private int 		  type ; 
   private String     name;
   private ImageIcon  image;
   private Date       lastModified;
   private long       size;
   private String     permission;      
   
   //phrase the information and 
   abstract void phrase(); 
   public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public ImageIcon getImage() {
		return image;
	}
	public void setImage(ImageIcon image) {
		this.image = image;
	}
	public Date getLastModified() {
		return lastModified;
	}
	public void setLastModified(Date lastModified) {
		this.lastModified = lastModified;
	}
	public long getSize() {
		return size;
	}
	public void setSize(long size) {
		this.size = size;
	}
	public String getPermission() {
		return permission;
	}
	public void setPermission(String permission) {
		this.permission = permission;
	}
	public static int getDirectory() {
		return DIRECTORY;
	}
	public static int getFile() {
		return FILE;
	}
   
	@Override
		public String toString() {
			// TODO Auto-generated method stub
			return this.getName() +" "
			+ this.getPermission()+" "
			+ this.getSize()+" "
			+ this.getLastModified()+" "
			+ this.getType()+" "
			+ this.getFile();
			
		}
   
}
